//
//  TLHtmlMediaItem.h
//  Coding_iOS
//
//  Created by taolei-mac on 2017/11/28.
//  Copyright © 2017年 com.lianchuan. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "TLHtmlMedia.h"

@class TLOwner;

typedef NS_ENUM(NSInteger, HtmlMediaItemType) {
    
    HtmlMediaItemType_Image = 0,
    HtmlMediaItemType_Code,
    HtmlMediaItemType_EmotionEmoji,
    HtmlMediaItemType_EmotionMonkey,
    HtmlMediaItemType_ATUser,
    HtmlMediaItemType_AutoLink,
    HtmlMediaItemType_CustomLink,
    HtmlMediaItemType_Math
};

@interface TLHtmlMediaItem : NSObject

@property (nonatomic, assign) HtmlMediaItemType type;
@property (nonatomic, assign) MediaShowType showType;
@property (nonatomic, copy) NSString *src;
@property (nonatomic, copy) NSString *title;
@property (nonatomic, copy) NSString *href;
@property (nonatomic, copy) NSString *name;
@property (nonatomic, copy) NSString *code;
@property (nonatomic, copy) NSString *linkStr;
@property (nonatomic, assign) NSRange range;

+ (instancetype)htmlMediaItemWithType:(HtmlMediaItemType)type;
+ (instancetype)htmlMediaItemWithTypeATUser:(TLOwner *)curUser mediaRange:(NSRange)curRange;

- (NSString *)displayStr;

- (BOOL)isGif;

@end
